package org.java8newfeature.stream;

public class StreamFunction {
    public static void main(String[] args) {
  /*      List<String> limitN = Stream.of("Monkey", "Lion", "Giraffe", "Lemur").
                limit(2)
                .collect(Collectors.toList());
        System.out.println(limitN);

        List<String> skipN = Stream.of("Monkey", "Lion", "Giraffe", "Lemur")
                .skip(2)
                .collect(Collectors.toList());
        System.out.println(skipN);

        List<String> uniqueAnimals = Stream.of("Monkey", "Lion", "Giraffe", "Lemur", "Lion")
                .distinct()
                .collect(Collectors.toList());
        System.out.println(uniqueAnimals);

        List<String> sorted = Stream.of("Monkey", "Lion", "Giraffe", "Lemur", "Lion")
                .sorted()
                .collect(Collectors.toList());
        System.out.println(sorted);*/

       /* List<String> parallelSorted = Stream.of("Monkey", "Lion", "Giraffe", "Lemur", "Lion")
                .parallel()
                .sorted()
                .collect(Collectors.toList());
        System.out.println(parallelSorted);*/

    }
}
